package com.zjh.notification.plugin;

import com.jfinal.kit.PathKit;
import com.jfinal.plugin.IPlugin;
import com.jfinal.plugin.activerecord.ActiveRecordPlugin;
import com.zjh.notification.model._MappingKit;
import com.zjh.notification.model.Notification;

/**
 * Created by zZz on 2017/4/25 0025.
 */
public class NotificationPlugin implements IPlugin {
    private ActiveRecordPlugin arp;

    public NotificationPlugin(ActiveRecordPlugin arp) {

        this.arp = arp;
    }

    @Override
    public boolean start() {
        arp.setBaseSqlTemplatePath(PathKit.getRootClassPath());
        arp.addSqlTemplate("notification.template");
        _MappingKit.mapping(arp);
        return true;
    }

    @Override
    public boolean stop() {
        return false;
    }
}
